﻿CREATE TABLE [dbo].[PatientsHistory] (
    [patientID]                         BIGINT         NOT NULL,
    [patientEntID]                      SMALLINT       NOT NULL,
    [patientLocationID]                 INT            NULL,
    [patientMemberDate]                 DATE           NULL,
    [patientFirstName]                  NVARCHAR (300) NOT NULL,
    [patientLastName]                   NVARCHAR (300) NOT NULL,
    [patientEmailList]                  BIT            NOT NULL,
    [patientEmailAddress]               NVARCHAR (300) NULL,
    [patientCreateDate]                 DATETIME       NOT NULL,
    [patientPrescriptionNumber]         NVARCHAR (50)  NULL,
    [patientDatePrescriptionExpiration] DATETIME       NULL,
    [patientAddress]                    NVARCHAR (300) NULL,
    [patientAddress2]                   NVARCHAR (300) NULL,
    [patientCity]                       NVARCHAR (100) NULL,
    [patientState]                      NVARCHAR (2)   NULL,
    [patientZip]                        NVARCHAR (9)   NULL,
    [patientPhoneCell]                  NVARCHAR (50)  NULL,
    [patientPhoneHome]                  NVARCHAR (50)  NULL,
    [patientPhoneOther]                 NVARCHAR (50)  NULL,
    [patientAllowSMS]                   BIT            NULL,
    [patientDatePhd]                    DATETIME       NULL,
    [patientDateBirth]                  DATETIME       NULL,
    [patientDriversLicenseNumber]       NVARCHAR (50)  NULL,
    [patientDriversLicenseString]       NVARCHAR (500) NULL,
    [patientDriversLicenseState]        NVARCHAR (2)   NULL,
    [isMember]                          BIT            NOT NULL,
    [patientMemberLocation]             INT            NULL,
    [patientDoctorID]                   INT            NULL,
    [doNotContact]                      BIT            NOT NULL,
    [lastUpdateDate]                    DATETIME       NOT NULL,
    [lastUserID]                        INT            NULL
);

